package com.ganinfo.api.controller;

import com.ganinfo.common.annotation.ApiMapping;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl {
	@ApiMapping("getUser")
	public UserInfo getUser(Long userId) {
		UserInfo info = new UserInfo();
		info.setName("小明");
		info.setSex("男");
		info.setUserId(userId);
		info.setIdcard("430527198108145443");
		if(info.getSex().equals("男0"))
		{
			// throw new Exception()
		}
		return info;
	}
	
	@ApiMapping("bit.api.user.getUser2")
	public UserInfo getUser4(Long userId) {
		UserInfo info = new UserInfo();
		info.setName("小明");
		info.setSex("男");
		info.setUserId(userId);
		info.setIdcard("430527198108145443");
		if(info.getSex().equals("男0"))
		{
			// throw new Exception()
		}
		
		return info;
	}
	
	@ApiMapping("bit.api.user.getUser2")
	public UserInfo getUser2(Long userId) {
		UserInfo info = new UserInfo();
		info.setName("小明2");
		info.setSex("男");
		info.setUserId(userId);
		info.setIdcard("430527198108145443");
		return info;
	}
}
